package com.cz.service;

import nova.traffic.NovaTraffic;
import nova.traffic.been.DeviceMemorySize;
import nova.traffic.been.DeviceNowPlayItem;
import nova.traffic.been.DeviceSize;

import java.io.File;
import java.io.IOException;
import java.net.Socket;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class BigScreenpull {
    public static void main(String[] args) throws IOException {
        NovaTraffic novaTraffic = new NovaTraffic("192.168.2.51", 5000);
        String name = novaTraffic.getDeviceName();
        //int ret = novaTraffic.getDeviceScreenshot("d:\\2.jpg");
        String content = "[all]\r\n" +
                "items=1\r\n" +
                "[item1]\r\n" +
                "param=4294960,1,1,1,0,5,1,0,1\r\n" +
                "txt1=60,24,1,7272,1,8,0,盂县服务区欢迎您,780,96,0\r\n"+
                "txtparam1=20,0\r\n"+
                "time1=820,10,200,120,4294960,1,8,2424,3,0,1,0,1,1,1,1,1,1,1,0,1,Asia/Shanghai,GMT+08:00,星期日|星期一|星期二|星期三|星期四|星期五|星期六\r\n"+
                //"clock1=860,10,148,148,8,4294960,Asia/Shanghai,GMT+08:00,0,5,2,1,5,3,4,2,1,1\r\n" +
                //"txtext1=0,100,0,288,3,3232,0,0,0,1,0,1,00000000,12,0,100,1,屏幕测试，敬请谅解,0,0,0,5,5,5\r\n"+
                "img1=0,121,pullceshi3.png,0,849,487\r\n" +
                "imgparam1=4294960\r\n"+
                "txt2=852,320,1,2424,1,8,0,停车位剩余,25,400,1\r\n"+
                "txtparam2=10,1\r\n"+
                "txt3=881,250,1,2424,1,8,0,超长货车车区:003,25,400,0\r\n"+
                "txtparam3=10,1\r\n"+
                "txt4=910,250,1,2424,1,8,0,前广场货车区:017,25,400,0\r\n"+
                "txtparam4=10,1\r\n"+
                "txt5=939,250,1,2424,1,8,0,前广场客车区:004,25,400,0\r\n"+
                "txtparam5=10,1\r\n"+
                "txt6=968,250,1,2424,1,8,0,前广场小车区:072,25,400,0\r\n"+
                "txtparam6=10,1\r\n"+
                "txt3=997,250,1,2424,1,8,0,后广场货车区:018,25,400,0\r\n"+
                "txtparam7=10,1";


        int ret = novaTraffic.sendPlayList(1, content);
        /*try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }*/
        //System.out.println(ret);
        //DeviceMemorySize mDeviceMemorySize = novaTraffic.getDeviceMemorySize();
        //DeviceNowPlayItem mDeviceNowPlayItem = novaTraffic.getNowPlayContent();
        //DeviceSize mDeviceSize = novaTraffic.getDeviceSize();
        System.out.println("name"+name);
        //int ret = novaTraffic.setPower(fasle);
        //int  ret = novaTraffic.sendFile(new File("d:\\pullceshi3.png"),"pullceshi3.png");
        System.out.println(ret);
    }
}
